package com.my.one;

import java.io.*;
import java.net.ServerSocket;
import java.net.Socket;

/*
* 目标客户端发送，服务端接受消息
* */
public class Server {
    public static void main(String[] args) throws IOException {
        try {
            //1、定义一个ServerSocket对象进行服务器端口注册
            ServerSocket ss = new ServerSocket(999);
            //2、监听客户端的Socket链接请求
            Socket socket = ss.accept();
            //3\从socker管督导中得到一个字节流对象
            InputStream is  = socket.getInputStream();
            //4、把字节输入流包装秤一个缓冲字符输入流
            //BufferedInputStream bis = new BufferedInputStream(is)
            BufferedReader br = new BufferedReader(new InputStreamReader(is));

        }catch (IOException e){

            e.printStackTrace();
        }

    }
}
